<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <title>执行信息</title>
</head>
<body>
<c:import url="casenavit.jsp" charEncoding="UTF-8"/>
<div class="col-sm-3 col-md-8 sidebar">
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th style="text-align:center">运行id</th>
                <th style="text-align:center">接口名称</th>
                <th style="text-align:center">是否通过</th>
                <th style="text-align:center">运行时间</th>
                <th style="text-align:center">详细结果</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${runinterruntwebs}" var="intresult">
                <tr>
                    <td style="text-align:center">${intresult.runinterid}</td>
                    <td style="text-align:center;width:180px; height:51px; word-wrap:break-word; word-break:break-all">
                            ${intresult.interfacename}
                    </td>
                    <c:choose>
                        <c:when test="${intresult.runstatus == 0}">
                            <c:set value="blue" var="rescolor" />
                            <c:set value="运行通过" var="runstatus" />
                        </c:when>
                        <c:otherwise>
                            <c:set value="red" var="rescolor" />
                            <c:set value="运行失败" var="runstatus" />
                        </c:otherwise>
                    </c:choose>
                    <td style="text-align:center;color: ${rescolor}">${runstatus}</td>
                    <fmt:formatDate type="both" value="${intresult.createtime}" var="createtime" />
                    <td style="text-align:center">${createtime}</td>
                    <td style="text-align:center">
                        <a href="/result/interresultinfo?projectid=${projectid}&resultid=${intresult.runinterid}">查看详细</a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>
